Integrand size = 18, antiderivative size = 132 \[ \int (f+g x) \log \left (c \left (d+e x^n\right )^p\right ) \, dx=-\frac {e f n p x^{1+n} \operatorname {Hypergeometric2F1}\left (1,1+\frac {1}{n},2+\frac {1}{n},-\frac {e x^n}{d}\right )}{d (1+n)}-\frac {e g n p x^{2+n} \operatorname {Hypergeometric2F1}\left (1,\frac {2+n}{n},2 \left (1+\frac {1}{n}\right ),-\frac {e x^n}{d}\right )}{2 d (2+n)}-\frac {f^2 p \log \left (d+e x^n\right )}{2 g}+\frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g} \]
-e*f*n*p*x^(1+n)*hypergeom([1, 1+1/n],[2+1/n],-e*x^n/d)/d/(1+n)-1/2*e*g*n* p*x^(2+n)*hypergeom([1, (2+n)/n],[2+2/n],-e*x^n/d)/d/(2+n)-1/2*f^2*p*ln(d+ e*x^n)/g+1/2*(g*x+f)^2*ln(c*(d+e*x^n)^p)/g
Time = 0.07 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.98 \[ \int (f+g x) \log \left (c \left (d+e x^n\right )^p\right ) \, dx=-\frac {e f n p x^{1+n} \operatorname {Hypergeometric2F1}\left (1,\frac {1+n}{n},1+\frac {1+n}{n},-\frac {e x^n}{d}\right )}{d (1+n)}-\frac {e g n p x^{2+n} \operatorname {Hypergeometric2F1}\left (1,\frac {2+n}{n},1+\frac {2+n}{n},-\frac {e x^n}{d}\right )}{2 d (2+n)}+f x \log \left (c \left (d+e x^n\right )^p\right )+\frac {1}{2} g x^2 \log \left (c \left (d+e x^n\right )^p\right ) \]
-((e*f*n*p*x^(1 + n)*Hypergeometric2F1[1, (1 + n)/n, 1 + (1 + n)/n, -((e*x ^n)/d)])/(d*(1 + n))) - (e*g*n*p*x^(2 + n)*Hypergeometric2F1[1, (2 + n)/n, 1 + (2 + n)/n, -((e*x^n)/d)])/(2*d*(2 + n)) + f*x*Log[c*(d + e*x^n)^p] + (g*x^2*Log[c*(d + e*x^n)^p])/2
Time = 0.38 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.03, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2913, 2383, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (f+g x) \log \left (c \left (d+e x^n\right )^p\right ) \, dx\) |
\(\Big \downarrow \) 2913 |
\(\displaystyle \frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g}-\frac {e n p \int \frac {x^{n-1} (f+g x)^2}{e x^n+d}dx}{2 g}\) |
\(\Big \downarrow \) 2383 |
\(\displaystyle \frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g}-\frac {e n p \int \left (\frac {f^2 x^{n-1}}{e x^n+d}+\frac {2 f g x^n}{e x^n+d}+\frac {g^2 x^{n+1}}{e x^n+d}\right )dx}{2 g}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(f+g x)^2 \log \left (c \left (d+e x^n\right )^p\right )}{2 g}-\frac {e n p \left (\frac {f^2 \log \left (d+e x^n\right )}{e n}+\frac {2 f g x^{n+1} \operatorname {Hypergeometric2F1}\left (1,1+\frac {1}{n},2+\frac {1}{n},-\frac {e x^n}{d}\right )}{d (n+1)}+\frac {g^2 x^{n+2} \operatorname {Hypergeometric2F1}\left (1,\frac {n+2}{n},2 \left (1+\frac {1}{n}\right ),-\frac {e x^n}{d}\right )}{d (n+2)}\right )}{2 g}\) |
-1/2*(e*n*p*((2*f*g*x^(1 + n)*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), -((e*x^n)/d)])/(d*(1 + n)) + (g^2*x^(2 + n)*Hypergeometric2F1[1, (2 + n)/ n, 2*(1 + n^(-1)), -((e*x^n)/d)])/(d*(2 + n)) + (f^2*Log[d + e*x^n])/(e*n) ))/g + ((f + g*x)^2*Log[c*(d + e*x^n)^p])/(2*g)
3.3.14.3.1 Defintions of rubi rules used
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> I nt[ExpandIntegrand[(c*x)^m*Pq*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, m, n , p}, x] && (PolyQ[Pq, x] || PolyQ[Pq, x^n]) && !IGtQ[m, 0]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.) + (g_. )*(x_))^(r_.), x_Symbol] :> Simp[(f + g*x)^(r + 1)*((a + b*Log[c*(d + e*x^n )^p])/(g*(r + 1))), x] - Simp[b*e*n*(p/(g*(r + 1))) Int[x^(n - 1)*((f + g *x)^(r + 1)/(d + e*x^n)), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, r}, x ] && (IGtQ[r, 0] || RationalQ[n]) && NeQ[r, -1]
\[\int \left (g x +f \right ) \ln \left (c \left (d +e \,x^{n}\right )^{p}\right )d x\]
\[ \int (f+g x) \log \left (c \left (d+e x^n\right )^p\right ) \, dx=\int { {\left (g x + f\right )} \log \left ({\left (e x^{n} + d\right )}^{p} c\right ) \,d x } \]
Result contains complex when optimal does not.
Time = 5.78 (sec) , antiderivative size = 214, normalized size of antiderivative = 1.62 \[ \int (f+g x) \log \left (c \left (d+e x^n\right )^p\right ) \, dx=- \frac {d^{-2 - \frac {2}{n}} d^{1 + \frac {2}{n}} e g p x^{n + 2} \Phi \left (\frac {e x^{n} e^{i \pi }}{d}, 1, 1 + \frac {2}{n}\right ) \Gamma \left (1 + \frac {2}{n}\right )}{2 \Gamma \left (2 + \frac {2}{n}\right )} - \frac {d^{-2 - \frac {2}{n}} d^{1 + \frac {2}{n}} e g p x^{n + 2} \Phi \left (\frac {e x^{n} e^{i \pi }}{d}, 1, 1 + \frac {2}{n}\right ) \Gamma \left (1 + \frac {2}{n}\right )}{n \Gamma \left (2 + \frac {2}{n}\right )} + f x \log {\left (c \left (d + e x^{n}\right )^{p} \right )} + \frac {g x^{2} \log {\left (c \left (d + e x^{n}\right )^{p} \right )}}{2} + \frac {d^{- \frac {1}{n}} d^{1 + \frac {1}{n}} e e^{\frac {1}{n}} e^{-1 - \frac {1}{n}} f p x \Phi \left (\frac {d x^{- n} e^{i \pi }}{e}, 1, \frac {e^{i \pi }}{n}\right ) \Gamma \left (\frac {1}{n}\right )}{d n \Gamma \left (1 + \frac {1}{n}\right )} \]
-d**(-2 - 2/n)*d**(1 + 2/n)*e*g*p*x**(n + 2)*lerchphi(e*x**n*exp_polar(I*p i)/d, 1, 1 + 2/n)*gamma(1 + 2/n)/(2*gamma(2 + 2/n)) - d**(-2 - 2/n)*d**(1 + 2/n)*e*g*p*x**(n + 2)*lerchphi(e*x**n*exp_polar(I*pi)/d, 1, 1 + 2/n)*gam ma(1 + 2/n)/(n*gamma(2 + 2/n)) + f*x*log(c*(d + e*x**n)**p) + g*x**2*log(c *(d + e*x**n)**p)/2 + d**(1 + 1/n)*e*e**(1/n)*e**(-1 - 1/n)*f*p*x*lerchphi (d*exp_polar(I*pi)/(e*x**n), 1, exp_polar(I*pi)/n)*gamma(1/n)/(d*d**(1/n)* n*gamma(1 + 1/n))
\[ \int (f+g x) \log \left (c \left (d+e x^n\right )^p\right ) \, dx=\int { {\left (g x + f\right )} \log \left ({\left (e x^{n} + d\right )}^{p} c\right ) \,d x } \]
-1/4*(g*n*p - 2*g*log(c))*x^2 - (f*n*p - f*log(c))*x + 1/2*(g*x^2 + 2*f*x) *log((e*x^n + d)^p) + integrate(1/2*(d*g*n*p*x + 2*d*f*n*p)/(e*x^n + d), x )
\[ \int (f+g x) \log \left (c \left (d+e x^n\right )^p\right ) \, dx=\int { {\left (g x + f\right )} \log \left ({\left (e x^{n} + d\right )}^{p} c\right ) \,d x } \]
Timed out. \[ \int (f+g x) \log \left (c \left (d+e x^n\right )^p\right ) \, dx=\int \ln \left (c\,{\left (d+e\,x^n\right )}^p\right )\,\left (f+g\,x\right ) \,d x \]